package stack;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * @author 老顾
 * @title: StackTest
 * @projectName java-restudy
 * @email: 1437594522@qq.com
 * @date 2022/11/7 8:48
 */
public class StackTest {

    private static final Logger logger = LoggerFactory.getLogger(StackTest.class);

    public static void main(String[] args) {
        Deque<Integer> deque = new ArrayDeque<>();
        deque.push(1);
        deque.push(2);
        deque.push(3);
        deque.push(4);
        deque.push(5);
        deque.push(6);
        deque.push(7);
        logger.info("弹出元素：{}", deque.pop());
        logger.info("弹出元素：{}", deque.pop());
        logger.info("弹出元素：{}", deque.pop());
        logger.info("弹出元素：{}", deque.pop());
        logger.info("弹出元素：{}", deque.pop());
        logger.info("弹出元素：{}", deque.pop());
    }
}
